#ifndef __CAN_H__
#define __CAN_H__
#include "sys.h"
#include <stdint.h>
#include "stm32f10x_can.h"

extern volatile uint8_t anchor_onoff_flag,anchor_event_flag,last_anchor_flag;
extern volatile float anchor_depth,anchor_ratio;
extern volatile uint8_t sys_reset_flag;
extern uint16_t pwm_value;
//extern uint16_t time_cnt;

extern uint8_t rgb_r,rgb_g,rgb_b,rgb_y,rgb_w;
extern uint8_t breath_fre;
extern uint8_t rgb_off_flag,rgb_on_flag,rgb_flash_flag,rgb_breath_flag;
	
void CAN_Configuration(uint16_t id);
void CAN1_Configuration(void);
void CAN_TX_PACKET_SHORT(uint16_t id,int16_t data1,int16_t data2,int16_t data3,int16_t data4);
void CAN_TX_PACKET_BYTE(uint16_t id,uint8_t data[8]);

#endif 
